<template>
  <div >
    <div>
    <textarea

      class="ipt" cols="30" rows="5"  @input="oninput" @change="onchange" ></textarea>
    </div>
      <div @click="startWithAppID"><text class="btn" >startWithAppID</text></div>
      <br/><div @click="setConfigAddress"><text class="btn" >setConfigAddress</text></div>

      <br/><div @click="setAppVersion"><text class="btn" >setAppVersion</text></div>

      <br/><div @click="setChannelID"><text class="btn" >setChannelID</text></div>

      <br/><div @click="setDeviceID"><text class="btn" >setDeviceID</text></div>

      <br/><div @click="SDKVersion"><text class="btn" >SDKVersion</text></div>

      <br/><div @click="setUserID"><text class="btn" >setUserID</text></div>

      <br/><div @click="setExtraInfo"><text class="btn" >setExtraInfo</text></div>

      <br/><div @click="setDropFrameTime"><text class="btn" >setDropFrameTime</text></div>

      <br/><div @click="useMpaas"><text class="btn" >useMpaas</text></div>

      <br/><div @click="useCustomLaunch"><text class="btn" >useCustomLaunch</text></div>
  </div>
</template>

<script>
import { Bonree } from '@/agent'
var startWithAppIDfun = Bonree.startWithAppID
var setConfigAddressfun = Bonree.setConfigAddress
var setAppVersionfun = Bonree.setAppVersion
var setChannelIDfun = Bonree.setChannelID
var setDeviceIDfun = Bonree.setDeviceID
var SDKVersionfun = Bonree.SDKVersion
var setUserIDfun = Bonree.setUserID
var setExtraInfofun = Bonree.setExtraInfo
var setDropFrameTimefun = Bonree.setDropFrameTime
var useMpaasfun = Bonree.useMpaas
var useCustomLaunchfun = Bonree.useCustomLaunch
// var modal = weex.requireModule('modal')
export default{
  data () {
    return {
      textvalue: ''
    }
  },
  methods: {
    // BonreestartWithAppID:Bonree.startWithAppID,
    startWithAppID () {
      startWithAppIDfun(this.textvalue)
    },
    setConfigAddress () {
      setConfigAddressfun(this.textvalue)
    },
    setAppVersion () {
      setAppVersionfun(this.textvalue)
    },
    setChannelID () {
      setChannelIDfun(this.textvalue)
    },
    setDeviceID () {
      setDeviceIDfun(this.textvalue)
    },
    SDKVersion () {
      SDKVersionfun(this.textvalue)
    },
    setUserID () {
      setUserIDfun(this.textvalue)
    },
    setExtraInfo () {
      setExtraInfofun(this.textvalue)
    },
    setDropFrameTime () {
      setDropFrameTimefun(this.textvalue)
    },
    useMpaas () {
      useMpaasfun(this.textvalue)
    },
    useCustomLaunch () {
      useCustomLaunchfun(this.textvalue)
    },

    oninput (event) {
      this.textvalue = event.value
    },
    onchange (event) {
      this.textvalue = event.value
    }
  }
}
</script>
<style>
  .ipt{
    border: 10px solid black;
    width: 500px;
    height: 300px;
  }
  .btn{
    width: 200px;
    height: 100px;
    background-color: gray;
  }
</style>
